package actions;

import java.util.*;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.struts.action.Action;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;

import forms.StudentsForm;
import forms.DegreeForm;

public class SpecializationAction extends Action {
	
	public ActionForward execute(ActionMapping mapping, ActionForm form,
			HttpServletRequest request, HttpServletResponse response) {
			
		String specialization = request.getParameter("specialization");
		
		// Cast the form
		StudentsForm iForm = (StudentsForm) form;
		
		// Update the student
		iForm.setSpecialization(specialization);
		
		return mapping.findForward("success");
	}

}
